From 20db95795f7c9829ec7fd8782d0f96978a7532cf Mon Sep 17 00:00:00 2001 From: "kaf24@scramble.cl.cam.ac.uk" Date: Wed, 21 Jan 2004 19:50:52 +0000 Subject: [PATCH] bitkeeper revision 1.685 (400ed81cDUJ0NzxWWYhOS6J0LBNivg) domain.c, dom0_ops.c, xc_linux_save.c: A few small fixes. --- tools/xc/lib/xc_linux_save.c | 7 ++++++- xen/common/dom0_ops.c | 2 ++ xen/common/domain.c | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/tools/xc/lib/xc_linux_save.c b/tools/xc/lib/xc_linux_save.c index e5f5934cff..42ed198a71 100644 --- a/tools/xc/lib/xc_linux_save.c +++ b/tools/xc/lib/xc_linux_save.c @@ -161,7 +161,12 @@ int xc_linux_save(int xc_handle, op.cmd = DOM0_STOPDOMAIN; op.u.stopdomain.domain = domid; - (void)do_dom0_op(xc_handle, &op); + if ( do_dom0_op(xc_handle, &op) != 0 ) + { + we_stopped_it = 0; + PERROR("Stopping target domain failed"); + goto out; + } sleep(1); } diff --git a/xen/common/dom0_ops.c b/xen/common/dom0_ops.c index d1659276c5..d1a2983ea6 100644 --- a/xen/common/dom0_ops.c +++ b/xen/common/dom0_ops.c @@ -354,6 +354,8 @@ long do_dom0_op(dom0_op_t *u_dom0_op) if ( likely(get_page(page, p)) ) { + ret = 0; + op.u.getpageframeinfo.type = NONE; if ( (page->type_and_flags & PGT_count_mask) != 0 ) diff --git a/xen/common/domain.c b/xen/common/domain.c index 315539e507..8e3338f7b5 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -205,6 +205,9 @@ long stop_other_domain(unsigned int dom) unsigned long cpu_mask; struct task_struct *p; + if ( dom == 0 ) + return -EINVAL; + p = find_domain_by_id (dom); if ( p == NULL) return -ESRCH; -- 2.30.2